﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Globalization;
using System.Web.Script.Services;
using System.Web.Security;
using System.Web.Services;
using System.Collections.ObjectModel;
using System.Text;
using System.Configuration;

using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace TractRecord.Authenticated
{
    public partial class _default : TractRecordBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public static void CreateProject()
        {
            try
            {
                if (!Roles.IsUserInRole("Project Administrator"))
                {
                    Roles.AddUserToRole(Membership.GetUser().UserName, "Project Administrator");
                }
            }
            catch (Exception e)
            {
                Code.Common.Log(e.ToString(), e.GetType().ToString(), 100, 0, System.Diagnostics.TraceEventType.Critical, "");
            }
        }
    }
}